/*
* $Id: JournalTreeView.h 152 2010-09-23 18:28:55Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _JOURNAL_TREE_VIEW_H_
#define _JOURNAL_TREE_VIEW_H_

#include "Components/Journal/JournalView.h"
#include "JournalTab.h"
#include "NavigationWin.h"
#include "State.h"
#include "ViewJournalFactory.h"

interface IViewJournal;

class CJournalTreeView : public CJournalView
{
	CViewJornalFactory m_viewFactory;
	CJournalTabCtrl m_tabCtrl;
	CNavigationWin m_NavigationWin;
	IViewJournal* m_pViewJornal;
	CSize m_sizeWin;
	CState m_state;
protected:
	void SelChange();
	void ChangeState(State state);
	void ItemManipulation(Journal::typeItemMnpl type, int param);
protected:
	DECLARE_MY_MESSAGE_MAP();
	long OnSetFocus(unsigned int wParam, long lParam);
	long OnSize(unsigned int wParam, long lParam);
	long OnItemManipulation(unsigned int wParam, long lParam);
	long OnTabSelChange(LPNMHDR pInfo);
	long OnTreeSelChange(LPNMHDR pInfo);
	long OnEndItemEdit(LPNMHDR pInfo);
public:
	CJournalTreeView();
	virtual ~CJournalTreeView();
public:
	virtual void CreateView(int hwnd);
};

#endif/*_JOURNAL_TREE_VIEW_H_*/